package com.iwhalecloud.citybrain.flow.platform.manager.domain.model.task;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @author lilh
 * @date 2019-04-25 11:16
 */
public class TaskReleaseNoticeVo {

    /**
     * 下发说明
     */
    private String noticeDescription;


    /**
     * 接收人
     */
    private List<NoticeReceiverVo> receivers = new ArrayList<>();

    public String getNoticeDescription() {
        return noticeDescription;
    }

    public void setNoticeDescription(String noticeDescription) {
        this.noticeDescription = noticeDescription;
    }

    public List<NoticeReceiverVo> getReceivers() {
        return receivers;
    }

    public void setReceivers(List<NoticeReceiverVo> receivers) {
        this.receivers = receivers;
    }

    public static class NoticeReceiverVo {

        private String name;

        private String type;

        private String code;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            NoticeReceiverVo that = (NoticeReceiverVo) o;
            return code.equals(that.code);
        }

        @Override
        public int hashCode() {
            return Objects.hash(name, type, code);
        }
    }
}
